
module.exports = async (ctx, next) => {
  if (!ctx.session.user) {
    ctx.body = {
      status: 403,
      message: '请先登录'
    }
    ctx.response.status = 403
  } else {
    await next()
  }
}